package pl.pkolodziej.platform.service.course;

import java.sql.Timestamp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import pl.pkolodziej.platform.dao.course.UserCourseDAO;
import pl.pkolodziej.platform.vo.course.UserCourseInfo;

@Service
public class UserCourseServiceImpl implements UserCourseService {

	@Autowired
	UserCourseDAO userCourseDAO;
	
	@Transactional
	public void updateUserCourseLastattempt(String username, int course_id, Timestamp lastattempt){
		userCourseDAO.updateUserCourseLastattempt(username, course_id, lastattempt);
	}

	@Transactional
	public void addUserCourse(UserCourseInfo uci) {
		userCourseDAO.addUserCourse(uci);
	}

}
